<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
 	<script type="text/javascript">
 		let arr = [1, 3, 4, 2, 3, 11, 44, 22, 22, 63, 11]

 		let newArr = []
 		newArr[0] = arr[0]
 		for(let i = 0; i < arr.length; i++){
 			let flag = false;//默认没有重复的
 			for(let j = 0; j < newArr.length; j++){
 				if (arr[i] === newArr[j]) {
 					// 跟newArr里的每一项比较，
 					flag = true
 					break
 				}
 			}
 			// 如果跟newarr比较完还是false， 说明newarr没有重复的
 			if (!flag) {
 				newArr.push(arr[i])
 			}
 		}
 		console.log(newArr)
 	</script>
</body>
</html>